#coding:utf8
from datetime import datetime
import socket
from djcelery.managers import PeriodicTaskManager


class CvirtPeriodicTaskManager(PeriodicTaskManager):
    def enabled(self):
        hostname = socket.gethostname()
        print "=============================="
        print 'come here:%s' % hostname
        print "=============================="
        return self.filter(enabled=True, topic__host_name=hostname).order_by("level")